package com.guaoran.micro.services.spring.boot.auto.configuraton.controller;

import com.guaoran.micro.services.spring.boot.starter.GuaoranTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author gucheng
 * @Description 使用自动配置的 {@link GuaoranTemplate}
 * 2019-07-10 14:29
 */
@RestController
public class GuaoranTemplateController {
    @Autowired
    private GuaoranTemplate guaoranTemplate;

    @GetMapping("/get")
    public String getString(){
        Map<String,String> map = new HashMap<>();
        map.put("key","value");
        map.put("test","test");
        return guaoranTemplate.toString(map);
    }
}
